Field of the Disclosure
This disclosure relates generally to type checking mechanisms for use in software programming, and more particularly to systems and methods for implementing Existential Type Packing for Structurally-Restricted Existential Types.
Description of the Related Art
Many programming languages have a static type system. When working within a static type system, a compiler may typically analyze the types of different variables and expressions in order to determine whether types, variables, expressions and/or statements are used in a legal manner (e.g., according to a specification for the particular programming language being used) and that error messages are generated describing improper use (e.g., according to the specification) of types, variables, expressions and/or statements.
When considering the logical space within which the types of a programming language exist, various logical constructs may be used to describe what is known (e.g., determined by the compiler) about the values appearing at any particular place within the program source code. For instance, a simple type system might use only primitive types and therefore when an int is used, the compiler may determine that there will be 32 bits (e.g., for a system that uses 32 bit integers) in a certain place and that those 32 bites represent a number.
For example, in the Java™ programming language, values are frequently pointers to objects and the types are things that a compiler can positively determine about those objects (such as what kind of class they belong to). Additionally, the Java programming language may utilize generics which may allow a compiler to determine particular things about various types. For example, the use of “String” in “List<String>”, may allow the compiler to determine more than simply that there is a List, but also what kind of things are in the List (e.g., the compiler may be able to determine that it is a list of strings). A programming language may use an _existential type_ to represent a part of a type that cannot be positively determined—“∃ X.List<X>”.